/* 
 * Project: colobok
 * and open the template in the editor.
 * @author: Sviatoslav Mysachenko <svyatoslavik@gmail.com>
 */


var Icons = (function(){
  var __SIZE__ = {
      _32x37_: new google.maps.Size(32,37),
      _36x37_: new google.maps.Size(36,37),
      _32x32_: new google.maps.Size(32,32),
      _40x50_: new google.maps.Size(40,50),
      _25x34_: new google.maps.Size(25,34)
  };
  var iconConf = {
      'hostel':{
          url: '/images/map-icons/hostel_5BA0C9.png',
          size: __SIZE__._32x37_
      },
      'lodging':{
          url: '/images/map-icons/lodging_5BA0C9.png',
          size: __SIZE__._32x37_
      },
      'zoom':{
          url: '/images/map-icons/zoom_stack.png',
          size: __SIZE__._36x37_
      },
      'zoom2':{
          url: '/images/map-icons/zoom32.png',
          size: __SIZE__._32x32_
      },
      'homesmile':{
          url: '/images/map-icons/homesmile.png',
          size: __SIZE__._40x50_
      },
       'empty':{
          url: '/images/map-icons/empty.png',
          size: __SIZE__._25x34_
      },
      'base':{
          url: '/images/map-icons/base.png',
          size: __SIZE__._32x37_
      }
      
  };
  function getIconConf(type){
      return iconConf[type];
  }
  function getIcon(iconType){
        return new google.maps.MarkerImage(
            getIconConf(iconType).url,
            getIconConf(iconType).size
        );
  }
  function getClusterIcon(iconType, text_count){
      return new google.maps.MarkerImage(
            '/markers/'+iconType+'/'+text_count+'.png',
            getIconConf(iconType).size
        );
  }
  return {
      getIcon:getIcon,
      getClusterIcon:getClusterIcon
  }  
}());
Icons.type = {
  hostel:'hostel',
  lodging: 'lodging',
  zoom: 'zoom',
  zoom2 : 'zoom2',
  homesmile: 'homesmile',
  empty: 'empty',
  base:'base'
}